import Cookies from 'js-cookie'
// 存储 token
const TokenKey = 'hrsaas-ihrm-token'
// 从cookies获取token
export function getToken() {
  return Cookies.get(TokenKey)
}
// 往cookies存储token
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
// 删除cookies中token
export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 存储获取 token时的时间
const TimeKey = 'hrsaas-timestamp-key'
// 从cookies获取时间
export function getTime() {
  return Cookies.get(TimeKey)
}
// 往cookies存储时间
export function setTime() {
  Cookies.set(TimeKey, Date.now())
}
